<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});
	
	// 认证路由...
	Route::get('auth/login', 'Auth\AuthController@getLogin');
	Route::post('auth/login', 'Auth\AuthController@postLogin');
	Route::get('auth/logout', 'Auth\AuthController@getLogout');

	// 注册路由...
	Route::get('auth/register', 'Auth\AuthController@getRegister');
	Route::post('auth/register', 'Auth\AuthController@postRegister');

	//重置密码
	Route::get('auth/password', 'Auth\PasswordController@password');
	Route::post('auth/update', 'Auth\PasswordController@update');
	
	//后台
	Route::get('/admin/', 'Admin\IndexController@index');

	// Route::get('/admin/product/new', 'Admin\ProductController@newProduct');
	// Route::get('/admin/products', 'Admin\ProductController@index');
	// Route::get('/admin/product/destroy/{id}', 'Admin\ProductController@destroy');
	// Route::post('/admin/product/save', 'Admin\ProductController@add');

	Route::get('/admin/infos', 'Admin\InfoController@index');
	Route::get('/admin/infos/edit', 'Admin\InfoController@edit');
	Route::post('/admin/infos/update', 'Admin\InfoController@update');

	Route::get('/admin/joins', 'Admin\JoinController@index');
	Route::get('/admin/joins/destroy/{id}', 'Admin\joinController@destroy');
	Route::get('/admin/joins/create', 'Admin\JoinController@create');
	Route::get('/admin/joins/edit/{id}', 'Admin\JoinController@edit');
	Route::post('/admin/joins/store', 'Admin\JoinController@store');
	Route::post('/admin/joins/update/{id}', 'Admin\JoinController@update');

	Route::get('/admin/activitys', 'Admin\ActivityController@index');
	Route::get('/admin/activitys/destroy/{id}', 'Admin\ActivityController@destroy');
	Route::get('/admin/activitys/create', 'Admin\ActivityController@create');
	Route::get('/admin/activitys/edit/{id}', 'Admin\ActivityController@edit');
	Route::post('/admin/activitys/store', 'Admin\ActivityController@store');
	Route::post('/admin/activitys/update/{id}', 'Admin\ActivityController@update');


	//前台
	Route::get('/index', 'Front\IndexController@index');
	Route::get('/', 'Front\IndexController@index');
	Route::get('/activity', 'Front\IndexController@activity');
	Route::get('/join', 'Front\IndexController@join');
	Route::get('/jtpk', 'Front\IndexController@jtpk');
	Route::get('/contact', 'Front\IndexController@contact');
	Route::get('/introduce', 'Front\IndexController@introduce');
